// components/openinfo/openinfo.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    isopentrue:{
      type:Boolean,
      value:false,
    },
    listid:{
      type:String,
      value:null,
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    ondown(e){
      let that = this;
      that.setData({
        isopentrue:false
      })
    },

    onupchanges(e){
      let that = this
      let listid = that.properties.listid
      wx.navigateTo({
        url: '/pages/modifyputong/modifyputong?listid='+listid,
      })
    },
    ondeletelink(e){
      let that = this
      var prolist = wx.getStorageSync('prolist')
      let listid = that.properties.listid
      //删除短链接
      wx.request({
        url: 'https://wxtp.hephp.cn/Api/Url/del', //仅为示例，并非真实的接口地址
        data: {
          uid:prolist.data.uid,
          id:listid
        },
        header: {
          'content-type': 'application/json' // 默认值
        },
        success (res) {
          if(res.data.code==200){
            wx.showToast({
              title: '删除成功',
              icon: 'success',
              duration: 2000
            })
          }
          console.log(res)
        }
      })


    },
  }
})
